package cn.graydove.bot.repository;

import cn.graydove.bot.model.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface UserRepository extends JpaRepository<User, Integer> {

    @Modifying
    @Query("update User u set u.attack=0, u.damage = 0")
    void clearAllAttack();

}
